import 'package:openai_api/openai_api.dart';

import '../env.dart';



class ChatGPTService {
   final client = OpenaiClient(
     config: OpenaiConfig(apiKey: Env.baseUrl)
   );
   Future<ChatCompletionResponse> sendChat(String content) async {
     final request = ChatCompletionRequest(model: Models.gpt3_5Turbo, messages: [
       ChatMessage(
         content: content,
         role: ChatMessageRole.user,
       )
     ]);
     return await client.sendChatCompletion(request);
   }
}